const { defineConfig } = require('@vue/cli-service')
const path = require("path");
const resolve = (dir) => path.join(__dirname, ".", dir)
module.exports = defineConfig({
  transpileDependencies: true,
	publicPath: "/chat-mobile",
	productionSourceMap: false,
	chainWebpack(config) {
		config.resolve.alias
      .set("@", resolve("src"));
		config.module.rule("svg").exclude.add(path.resolve("src/icons")).end()
		config.module
			.rule("icons")
			.test(/\.svg$/)
			.include.add(path.resolve("src/icons"))
			.end()
			.use("svg-sprite-loader")
			.loader("svg-sprite-loader")
			.options({
				symbolId: "icon-[name]",
			})
			.end()
	},
	devServer: {
		port: 8090,
		host: '0.0.0.0',
		https: false,
		open: true,
		proxy: {},
		client: {
			overlay: false // 编译错误时，取消全屏覆盖（建议关掉）
		}
	},
})
